package com.itheima.api.exception;

import java.util.Scanner;

public class Demo11_1 {

    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);
        System.out.println("请录入一个分数");
        String next = scanner.next();

        int i = Integer.parseInt(next);
        if (i > 100 || i < 0){
            throw new Demo11("你输入的分数有误，分数应该在0-100之间");
        }
        System.out.println("你输入的分数为" + i);
    }
}
